<?php

require_once(dirname(__FILE__) . '/appconf.php');

class Blog_user extends Site {

    function setup() {
        $this->run_modes('get');
        $this->start_mode('get');
        $this->selfurl = '/dbMoveBlog.php';
        parent::setup();
    }

    function cgiapp_prerun() {
        parent::cgiapp_prerun();
    }

    function action_get() {
		$blog_name_array = array(
			array('blog_name' => 'beautyhunter', 'blogid' => 263),
			array('blog_name' => 'beckylau', 'blogid' => 266),
			array('blog_name' => 'bibob', 'blogid' => 70),
			array('blog_name' => 'celiaau', 'blogid' => 286),
			array('blog_name' => 'chanlailate', 'blogid' => 267),
			array('blog_name' => 'cherryastor', 'blogid' => 259),
			array('blog_name' => 'chicmanman', 'blogid' => 277),
			array('blog_name' => 'dingdingchan', 'blogid' => 273),
			array('blog_name' => 'elyse214', 'blogid' => 268),
			array('blog_name' => 'heratoftheocean', 'blogid' => 270),
			array('blog_name' => 'juan', 'blogid' => 262),
			array('blog_name' => 'juliaa', 'blogid' => 272),
			array('blog_name' => 'kammy41', 'blogid' => 285),
			array('blog_name' => 'komichan', 'blogid' => 288),
			array('blog_name' => 'manman811', 'blogid' => 269),
			array('blog_name' => 'maxine', 'blogid' => 274),
			array('blog_name' => 'mayel', 'blogid' => 278),
			array('blog_name' => 'mokbb', 'blogid' => 265),
			array('blog_name' => 'moniquelau', 'blogid' => 281),
			array('blog_name' => 'popobb', 'blogid' => 282),
			array('blog_name' => 'siua', 'blogid' => 275),
			array('blog_name' => 'smallbird1111', 'blogid' => 283),
			array('blog_name' => 'tatachow', 'blogid' => 280),
			array('blog_name' => 'wawa', 'blogid' => 271),
			array('blog_name' => 'wingmiracle', 'blogid' => 264),
			array('blog_name' => 'wkykam', 'blogid' => 276),
			array('blog_name' => 'yankiki', 'blogid' => 113),
			array('blog_name' => 'yeeki212', 'blogid' => 287),
			array('blog_name' => 'pasco', 'blogid' => 290),
			//array('blog_name' => 'admin', 'blogid' => 0),
			array('blog_name' => 'tabokiss', 'blogid' => 260),
			array('blog_name' => 'aninaho', 'blogid' => 167),
			array('blog_name' => 'jane-fiesta', 'blogid' => 28),
			array('blog_name' => 'jamie318', 'blogid' => 204),
			array('blog_name' => 'daizyland', 'blogid' => 58),
			array('blog_name' => 'elawwong', 'blogid' => 48),
			array('blog_name' => 'janey', 'blogid' => 30),
			array('blog_name' => 'rachellam', 'blogid' => 201),
			array('blog_name' => 'deilsiu', 'blogid' => 257),
			array('blog_name' => 'willor', 'blogid' => 168),
			array('blog_name' => 'kolenbut', 'blogid' => 195),
			array('blog_name' => 'kelvinkan', 'blogid' => 180),
			array('blog_name' => 'ritzlam', 'blogid' => 166),
			array('blog_name' => 'jaden', 'blogid' => 170),
			array('blog_name' => 'rose', 'blogid' => 169),
			array('blog_name' => 'joseph', 'blogid' => 189),
			array('blog_name' => 'meling', 'blogid' => 6),
			array('blog_name' => 'koby', 'blogid' => 51),
			array('blog_name' => 'shirleyfoo', 'blogid' => 39),
			array('blog_name' => 'lamyi', 'blogid' => 49),
			array('blog_name' => 'leliachow', 'blogid' => 29),
			array('blog_name' => 'stellastella', 'blogid' => 110),
			array('blog_name' => 'isischiu', 'blogid' => 3),
			array('blog_name' => 'mandytam', 'blogid' => 2),
			array('blog_name' => 'dominique', 'blogid' => 52),
			array('blog_name' => 'vincy', 'blogid' => 191),
			array('blog_name' => 'yoko', 'blogid' => 293),
			array('blog_name' => 'crystal', 'blogid' => 292),
			array('blog_name' => 'cillap', 'blogid' => 291),
		);
		foreach($blog_name_array as $key=>$value){
			$data[$value['blog_name']]=$value['blogid'];
		}
		echo '<pre>' . var_export($data, 1) . '</pre>';
		/* $datas = array();
		foreach($blog_name_array as $key=>$value){
			$param = array();
			$param['field'] = "id,post_date,post_title";
			$param['where'] = " post_status='publish' and post_type='post'";
			$param['order'] = " post_date desc";
			$param['group'] = "";
			$param['limit'] = "1";
			$param['pagesize'] = "";
			$param['page'] = "";
			$param['join'] = "";
			$param['on'] = "";
			$data = db_query_hash('wp_' . $value['blogid'] . '_posts', $param, IMOREBLOGDB);
			$data['result'][0]['blog_name'] = $value['blog_name'];
			$data['result'][0]['blogid'] = $value['blogid'];
			$datas[$value['blog_name']] = $data['result'][0];
		}
		$this->ajaxReturn($datas, array('retcode' => '1', 'msg' => 'ok')); */
    }

}
$webapp = new Blog_user();
$webapp->run();
?>